package com.kunchi.oms.order.api;

import com.kunchi.isb.base.exception.ISBException;
import com.kunchi.isb.base.result.ISBResult;
import com.kunchi.isb.service.ISBPlainParamService;
import com.kunchi.oms.order.po.Order;
import com.kunchi.oms.order.service.OrderService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "订单", tags = {"orderAdd"},description = "新增订单")
@RestController
@RequestMapping("/oms/orderAdd")
public class OrderAddApi extends ISBPlainParamService<Order,Order> {

    @Autowired
    OrderService orderService;
    @Override
    protected ISBResult doService(ISBResult<Order> isbResult, Order order) throws ISBException {
        orderService.add(order);
        return isbResult;
    }
}
